{extend name="base"/}
{block name="main"}
<div class="Hui-article">
    <article class="cl pd-20">
        <div id="tab_demo" class="HuiTab" style="margin-bottom: 15px; position:relative;">
            <div class="tabBar clearfix">
                <span class="current">自定义设置</span>
            </div>
        </div>
        <div>
            <div class="mt-20">
                <table class="table table-border table-bordered table-bg table-hover table-sort">
                    <thead>
                    <tr class="text-c">
                        <th>特殊字符</th>
                        <th></th>
                        <th>小程序端显示</th>
                    </tr>
                    </thead>
                    <tbody id="tbody">
                    {foreach name="share" item='vo' index='k'}
                    <tr class="text-c va-m">
                        <td>
                            <span style="text-align: center" class="share_span" span_targ="mytarg{$k}" >{$share_default[$k]}</span>
                        </td>
                        <td>==>></td>
                        <td>
                            <input type="text" value="{$vo}" onchange="set_share_title('{$k}',this.value)" class="input-common" id="mytarg{$k}" style="text-align: center">
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </article>
{/block}
{block name="script"}
<script type="text/javascript">
    function set_share_title(type,val) {
        $.ajax({
            type : "post",
            url : "__CONF_SITE__admin/Activity/set_share_title",
            data : {
                "type" : type,
                'val':val
            },
            success : function(data) {
                if (data['code'] >0) {
                    layer.msg('成功!',{icon:1,time:1000},function () {
                        window.location.reload();
                    });
                }
                else
                {
                    layer.msg('失败', {icon: 2, time: 1000});
                }
            }
        })
    }
</script>
</script>
{/block}